import { defineConfig } from 'vitepress'


import { navConfig } from './navConfig'; // 引入导航栏配置文件
import { sidebarConfig } from './sidebarConfig'; // 引入侧边栏配置文件


export default defineConfig({
  title: "HHLLXX",
  head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
  description: "记录笔记文档页",
  themeConfig: {
    logo: "/logo.png",
    outlineTitle: "本章目录",   // 右侧目录title
    outline: [2, 5],    // 默认展开的目录层级

    nav: navConfig,
    sidebar: sidebarConfig,

    socialLinks: [
      { icon: 'github', link: 'https://gitee.com/hhllxx' }
    ],

    footer: {
      copyright: 'Copyright © 2024-present hhllxx'
    },
    docFooter: {
      prev: '上一篇',
      next: '下一篇'
    },

    // 设置搜索框的样式
    search: {
      provider: "local",
      options: {
        translations: {
          button: {
            buttonText: "搜索文档",
            buttonAriaLabel: "搜索文档",
          },
          modal: {
            noResultsText: "无法找到相关结果",
            resetButtonTitle: "清除查询条件",
            footer: {
              selectText: "选择",
              navigateText: "切换",
            },
          },
        },
      },
    },
  },

  // 配置katex公式
  markdown: {
    lineNumbers: true,
    math: true,
    lazyLoading: true,  // 图片懒加载
    // 容器
    container: {
      detailsLabel: '点击查看'
    },
  },
})

